package com.tom.architect.day21.simple1;

/**
 * Added by Tom on 2023/12/27.
 */
public class Order {
    public final int OBLIGATION = 1; // 代付款
    public final int PAID = 2; // 已付款
    public final int WAIT_RECEIVING = 3; // 待收货
    public final int WAIT_COMMENT = 4; // 待评价

    public int mStatus = OBLIGATION; // 订单的状态

    // 付款
    public void pay() {
        // 待付款状态
        if (mStatus == OBLIGATION) {
            mStatus = PAID;
            System.out.println("付款");
        }
        // else if(...) {...}
        else {
            System.out.println("不在状态了");
        }
    }
    // 发货
    //region Description
    public void deliverGoods() {
        if (mStatus == PAID) {
            mStatus = WAIT_RECEIVING;
            System.out.println("发货");
        }
        // else if(...) {...}
        else {
            System.out.println("不在状态了");
        }
    }

}
